package com.tidy.seed.admin.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.time.LocalDateTime;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
// 引入Jackson时间格式化注解（仅导入一次）
import com.fasterxml.jackson.annotation.JsonFormat;

import javax.xml.soap.Text;

/**
 * <p>
 *
 * </p>
 *
 * @author HZ-ZY
 * @since 2025-08-06
 */
@ApiModel(value = "Log对象", description = "")
@Getter
@Setter
@TableName("sys_log")
public class Log implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "用户标识", notes = "字段名：userFlag")
    private String userFlag;

    @ApiModelProperty(value = "请求ip", notes = "字段名：ip")
    private String ip;

    @ApiModelProperty(value = "日志名", notes = "字段名：name")
    private String name;

    @ApiModelProperty(value = "请求方法", notes = "字段名：method")
    private String method;

    @ApiModelProperty(value = "请求接口", notes = "字段名：path")
    private String path;

    @ApiModelProperty(value = "请求参数", notes = "字段名：arguments")
    private String arguments;

    @ApiModelProperty(value = "状态码", notes = "字段名：status")
    private Integer status;

    @ApiModelProperty(value = "错误消息", notes = "字段名：message")
    private String message;

    @ApiModelProperty(value = "日志类型 0错误日志 1日常日志 ", notes = "字段名：type")
    private Integer type;

    @ApiModelProperty(value = "创建时间", notes = "字段名：createAt")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createAt;

    @ApiModelProperty(value = "更新时间", notes = "字段名：updateAt")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateAt;

}